import {
  Column,
  CreateDateColumn,
  Entity,
  PrimaryGeneratedColumn,
  UpdateDateColumn,
} from 'typeorm';

@Entity()
export class SpecialColumn {
  // 主键 唯一且自增长
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ type: 'varchar', length: 50, unique: true })
  title: string;

  @Column({ type: 'varchar', length: 200 })
  description: string;

  @Column({ default: 1 })
  createdBy: number; // 创建人id

  @Column()
  createdByAccount: string;

  @CreateDateColumn()
  createdTime: Date;

  @Column({ default: 1 })
  updatedBy: number; // 更新人Id

  @Column()
  updatedByAccount: string;

  @UpdateDateColumn()
  updatedTime: Date;

  @Column({ default: 0 })
  isDeleted: number; // 是否删除，0表示未删除，1表示已删除
}
